package controllers

import (
	"time"

	"advertoper/errorcode"
	"advertoper/servicepage"
)

type ServicePageController struct {
	URLSignController
}

func (p *ServicePageController) GetServicePageInfo() {
	defer p.Output("GetServicePageInfo")
	versionid, _ := p.GetInt64("version_id", 0)

	servicepageInfo, action := servicepage.GetServicePageInfoService().GetServicePageInfo(p.Appkey, versionid)
	p.Resp["code"] = errorcode.EC_GL_SUCCESS
	p.Resp["msg"] = errorcode.Msg(errorcode.EC_GL_SUCCESS)
	p.Resp["action"] = action
	p.Resp["current_tick"] = time.Now().Unix()
	if servicepageInfo != nil {
		p.Resp["data"] = servicepageInfo
	}
}
